package 每日练习;


//判断一个范围内的素数
public class text13 {
    public static void main(String[] args)
    {
        int i,j;
        int count= 0;
        for(i=2;i<=100;i++)
        {
            int flag = 1;
            for(j = 2;j*j<=i;j++)
            {
                if(i%j == 0)
                {
                    flag = 0;
                    break;
                }
            }
            if(flag == 1)
            {
                System.out.print(i+"  ");
                count++;
            }
        }
        System.out.println("\n"+count);
    }
}
